package entity

import "gitee.com/night-tc/gobige/msgdef/protomsg"

/*
对象消息
*/
type Entity_Proc struct {
	owner IPost
}

func (this *Entity_Proc) MsgProc_SyncEntityProps(msg *protomsg.SyncEntityProps) {
	this.owner.ReadSyncProps(msg.Props)
}

func (this *Entity_Proc) MsgProc_EntityRegNtf(msg *protomsg.EntityRegNtf) {
	this.owner.RefreshSrvIDS()
	if msg.IsReg {
		// 如果是注册，需要同步属性给对方
		this.owner.SyncSrvPropsAll(msg.SrvType)
	}
}
